<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="./css/public.css">
    <style media="screen">
      ul li{
        float: left;
      }
      li a{
        display: block;
        width: 62px;
        height: 22px;
        line-height: 22px;
        text-align: center;
        background: url(images/bg.gif) no-repeat;
        color: #666;
      }
      a.a2{
        background-position: -62px 0;
      }
      a.a3{
        background-position: -124px 0;
      }
      a.a4{
        background-position: -186px 0;
      }
      a.a1:hover{
        background-position: 0px -22px;
      }
      a.a2:hover{
        background-position: -62px -22px;
      }
      a.a3:hover{
        background-position: -124px -22px;
      }
      a.a4:hover{
        background-position: -186px -22px;
      }
    </style>
  </head>
  <body>
    <ul>
      <li>
        <a href="#" class="a1">算法</a>
      </li>
      <li>
        <a href="#" class="a2">算法</a>
      </li>
      <li>
        <a href="#" class="a3">算法</a>
      </li>
      <li>
        <a href="#" class="a4">算法</a>
      </li>
    </ul>
  </body>
</html>
